package com.vertxsample.samples.core.db

import org.jooq.DSLContext
import org.jooq.Record
import org.jooq.Result
import kotlin.streams.toList

open class BaseJooqDao(val dslContext: DSLContext) {
    open fun convertToMapList(result:Result<Record>) :List<Map<String,Any>>?{

        if(result!=null && result.isNotEmpty) {
           return result.stream().map { r->r.intoMap() }.toList();

        }

        return null

    }

}